
<%--
XPTracker - Alternative Agile Tracking Tool
Copyright (C) 2006-2009  Stephen Starkey

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
--%>
<%@ include file="/taglibs.jsp" %>
<%@ attribute name="story" type="org.xptracker.domain.Story" %>
<%@ attribute name="show_icons" type="java.lang.Boolean" required="false" %>
<%@ attribute name="show_id" type="java.lang.Boolean" required="false" %>
<%
  if(show_icons == null) {
    jspContext.setAttribute("show_icons", true);
  }
  if(show_id == null) {
    jspContext.setAttribute("show_id", true);
  }

%>

<c:if test="${empty storyLinkId}">
  <c:set var="storyLinkId" value="0" scope="session"/>
</c:if>
<c:if test="${show_icons}">
  <s:url beanclass="org.xptracker.web.EffortSparkActionBean" var="sparkUrl"/>
  <img src="${sparkUrl}?storyId=${story.id}" alt="preview" style="vertical-align:middle;"/>

  <c:forEach items="${story.categories}" var="category"><xp:category-image category="${category}" size="small" style="vertical-align:middle"/></c:forEach>
    <span style="position:relative;"><span style="cursor: default; position:relative; font-size:120%; font-weight:bold">
      <img src="${pageContext.request.contextPath}/images/icon_binocular.gif" alt="preview" style="vertical-align:bottom;" onmouseover="loadStoryFragment('${xp:jsFriendly(pageContext.request.contextPath)}', ${story.extId}, ${storyLinkId});" onmouseout="currentDivId = ''; $('popup_${story.extId}_${storyLinkId}'  ).hide()"/>
    </span>
</c:if>
<s:link beanclass="org.xptracker.web.DisplayActionBean">
  <s:param name="id" value="${story.extId}"/>
  <c:if test="${show_id}">${story.extId}: </c:if>${story.summary}
</s:link>
<c:if test="${show_icons}">
  <div id="popup_${story.extId}_${storyLinkId}" class="popup-div" style="display:none;"></div></span>
<c:set var="storyLinkId" value="${storyLinkId + 1}" scope="session"/>
</c:if>